<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <base th:href="${#servletContext.getContextPath()+'/'}">
    <link rel="stylesheet" type="text/css" href="bootstrap-3.4.1/dist/css/bootstrap.css">
    <script type="text/javascript" src="jquery/jquery-3.6.1.min.js"></script>
    <script type="text/javascript" src="bootstrap-3.4.1/dist/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="jquery/http.js"></script>

    <script type="application/javascript">
        $(function () {
            $("#form-sysuser-add").submit(function () {
                console.log("23");
                   submit("form-sysuser-add","SystemUserServlet/add",function (date) {
                        // 这个函数服务端响应成功后调用
                       location.href="SystemUserServlet/list";
                   })
                return false;  // 不要再自动提交了
                }
            )
        })

    </script>
</head>
<body>

<form class="form-horizontal" id="form-sysuser-add" action="">

    <br>
    <br>
    <div class="form-group">
        <label class="col-sm-7 control-label"><h1>添加操作</h1></label>
        <div class="col-sm-2">
        </div>
    </div>
    <br>
    <br>

    <div class="form-group">

        <label class="col-sm-5 control-label">用户名</label>
        <div class="col-sm-3">
            <input type="text" class="form-control" name="username"  placeholder="请输入用户名...">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-5 control-label">密码</label>
        <div class="col-sm-3">
            <input type="password" class="form-control" name="password"  placeholder="请输入密码...">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-5 control-label">邮箱</label>
        <div class="col-sm-3">
            <input type="email" class="form-control" name="email"  placeholder="请输入邮箱...">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-5 control-label">出生日期</label>
        <div class="col-sm-3">
            <input type="date" class="form-control" name="birthday"  placeholder="birthday...">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-5 control-label">性别</label>
        <div class="radio">
            <label class="radio-inline">
                <input type="radio" name="sex" value="1">男
            </label>
            <label class="radio-inline">
                <input type="radio" name="sex" value="0" checked>女
            </label>
        </div>
    </div>

    <div class="form-group">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="submit" class="btn btn-default">添加</button>
        </div>
    </div>
</form>

</body>
</html>